﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using System.Data;
using produccion.reportes;
using System.Windows.Controls.Primitives;
using System.Threading;
using System.Globalization;
using System.Collections;
using Oracle.DataAccess.Client;

namespace produccion.forms
{
    /// <summary>
    /// Lógica de interacción para FrmPruebasJavier.xaml
    /// </summary>
    public partial class FrmPruebasJavier : Window
    {
        public FrmPruebasJavier()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            EjecutarSP_PRUEBA();
        }
        private void EjecutarSP_PRUEBA()//FJRF - Este procedimiento ejecuta un sp
        {
            try
            {
                MDOgeneral.spComando.CommandText = "PRUEBA";
                MDOgeneral.spComando.Connection = MDOgeneral.conexion;
                MDOgeneral.spComando.CommandType = CommandType.StoredProcedure;
                MDOgeneral.spComando.Parameters.Clear();

                MDOgeneral.spComando.Parameters.Add("SYS_REFCURSOR", Oracle.DataAccess.Client.OracleDbType.RefCursor).Direction = ParameterDirection.Output;

                DataSet ds = new DataSet(); OracleDataAdapter da = new OracleDataAdapter(MDOgeneral.spComando);
                da.Fill(ds);
            }
            catch (Exception ex)
            {
                
            }
        }
    }
}
